package com.bdqn.mybaitsxml;

import com.bdqn.mybaitsxml.Mapper.UserMapper;
import com.bdqn.mybaitsxml.pojo.SysUser;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.sql.SQLOutput;

@RunWith(SpringRunner.class)
@SpringBootTest
public class UserMapperTester {
    @Resource
    private UserMapper userMapper;
    @Test
    public void testInsert()throws Exception{
        userMapper.insert(new SysUser("k","123456",3L,1));
    }
//    @Test
//    public void testGet(){
//        SysUser sysUser= (SysUser) userMapper.get(8L);
//        System.out.println("usrName"+sysUser.getUsrName());
//    }

@Test
    public void testGet() {
        SysUser user = userMapper.get(10L);
        if (user != null) {
            System.out.println(user.toString());
        }
    }
}
